package pers.zc.activiti.thread.demo2;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description
 * @Author Lin FuYuan
 * @date 2020/5/28
 */
@Service
public class ChildTask2 extends ParentStatus {
    @Autowired
    private TestThreadPool2 testThreadPool;

    @Autowired
    private TaskDemo2 taskDemo2;
    public void runTasks() throws Exception {
        //创建多个作业
        for (int i = 0; i <10 ; i++) {
            //调用异步方法,记录状态为等待
            String str = String.valueOf(i);
            statusMap.put(String.valueOf(i),new Entity(WAIT));
            Boolean test = taskDemo2.test(str);
        }
        //根据业务情况定  删除所有状态数据
        statusMap.clear();
    }

}
